-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
future-incompat-report
checks both stdout and stderr for color support
#10024
Conversation
r? @Eh2406 (rust-highfive has picked a reviewer for you, use r? to override) |
Not sure how to test it locally, I tried using the one described in rust-lang/rust#71249 (comment), but it produces @ehuss can you help to give some directions? |
Can you say more about exactly what you tried? You have to use the |
Oh, works fine for me after clearing |
I see that you have marked this ready for review. However, there appears to be several CI errors? Also, can you say why you added the atty check? That doesn't seem correct to me. |
That being said, I just remembered that atty check does not play nicely with CI, so it's breaking on colored output tests. |
I think there may be some confusion. Cargo has its own tty checking here and here. However, it only checks for stderr as a tty. I don't think we want to change the supports_color function since that already handles TTY, and also handles cli and environment color settings. I'm not sure exactly how to structure it, but I think the stdout checks will likely need to mirror the existing stderr tty checks. |
Ah, you're right, I missed the atty check on stderr. |
Thanks! Would you mind squashing to one commit? |
Done 🙂 |
Thanks! @bors r+ |
📌 Commit 622b43a has been approved by |
☀️ Test successful - checks-actions |
Update cargo 11 commits in 2e2a16e983f597da62bc132eb191bc3276d4b1bb..ad50d0d266213e0cc4f6e526a39d96faae9a3842 2021-11-08 15:13:38 +0000 to 2021-11-17 18:36:37 +0000 - Warn when alias shadows external subcommand (rust-lang/cargo#10082) - Implement escaping to allow clean -p to delete all files when directory contains glob characters (rust-lang/cargo#10072) - Match any error when failing to find executables (rust-lang/cargo#10092) - Enhance error message for target auto-discovery (rust-lang/cargo#10090) - Include note about bug while building on macOS in mdbook (rust-lang/cargo#10073) - Improve the help text of the --quiet args for all commands (rust-lang/cargo#10080) - `future-incompat-report` checks both stdout and stderr for color support (rust-lang/cargo#10024) - Remove needless borrow to make clippy happy (rust-lang/cargo#10081) - Describe the background color of the timing graph (rust-lang/cargo#10076) - Make ProfileChecking comments a doc comments (rust-lang/cargo#10077) - Fix test: hash value depends on endianness and bitness. (rust-lang/cargo#10011)
Closes #9960